obj = require('./compile_sol.js')

//部署
account = '0xd6cc4024572ca10bffbb0d1802e1991608ad665f';
Web3 = require('web3');
web3 = new Web3();
web3.setProvider('http://localhost:8546');

var gasInfo = {
    from: account,
    gas: 1500000,
    gasPrice: '1'
};

myContract = new web3.eth.Contract(obj.abi, '0xC79459de1ca9477178f50e01704269d6bc1d002e');
// myContract.methods.testFunc().call(function (err, res) {
//     console.log("res: " , res);
// });

myContract.methods.setValue(200)
    .send(gasInfo, function (err, res) {
        console.log("res: ", res);
    });
